package com.zhj.common.swagger;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import springfox.documentation.service.Contact;

@ConfigurationProperties(prefix = "swagger")
@Data
public class Swagger2Config {

    private String title;

    private String basePackage;

    private String version;

    private String description;

    private ContactInfo contact;

    @Data
    public static class ContactInfo {
        private String name;
        private String url;
        private String email;

        public Contact build() {
            return new Contact(this.name, this.url, this.email);
        }
    }

}
